A mechanism which combines a plurality of digital audio signal data samples into a single digital audio signal data sample is typically called a "mixer". The definition of an audio sample is a value taken to record the amplitude at a given point of time. Digital audio has two aspects, a sampling rate and a value. Typically, the amplitude is recorded once every sampling period and that amplitude is stored as a value, generally an 8-bit or 16-bit resolution, known as the quantization factor. Herein, the value of a digital audio signal sample is regarded as its amplitude and the terminology of "summing" digital audio samples means to add together the amplitudes of those samples.
There are two common mixing methods used to combine the plurality of data samples: the sum and hard clip method and the sum, scale by a constant value and hard clip method. Hard clipping refers to a method for limiting the sum to the bit-size of the output by reducing sums which exceed a maximum value to that maximum value. Hard clipping generally produces a discontinuity that leads to high order and low order harmonics. Typically, high order harmonics are perceptibly distorted to the human ear.
In the sum and hard clip method, samples from the plurality of audio channels are summed together and then clipped if they overflow the size of the output sample. For example, in a situation where two data streams are being combined into a single data stream, each data stream having 8-bit samples, the two 8-bit samples from the data streams being combined are summed into a 16-bit value and then clipped to 8-bit resolution. The clipping of the sum generally produces distortion because the waveform of the original sound is not being accurately reproduced.
In the sum, scale by a constant value and hard clip method, an attempt is made to limit the distortion by scaling the sum of the samples by a constant value and then hard clipping if the result overflows the size of the output sample. However, the scaling of the sum typically results in a lowering of the amplitude, i.e. volume.
A sum, scale by a constant value and hard clip method is used in the Sound Manager 2.0, available as part of the Apple Macintosh operating system, version 6.0.7 and System 7, developed by Apple Computer, Inc. The Sound Manager 2.0 is described in "Inside Macintosh, Vol. VI, Chapter 22, Addison-Wesley Publishing Co., 1991. In that method, the samples being mixed are added together and then scaled by dividing the number of samples added. Using this method, an output sample is not greater than the maximum, but the amplitudes of each source are typically reduced. For example, if two channels are mixed, the amplitudes are averaged using this method which generally results in a lower overall amplitude. This method generally reduces the overall amplitude of the sound by 1/n, where n is the number of sources combined to produce the sound.
Depending on the scale factor, the sum, scale by a constant value and hard clip method may reduce distortion, but it also generally decreases the overall amplitude of the output stream considerably, resulting in loss of fidelity.